const models = require('../model/usermodel/usermodel')
module.exports = {

    index(req, res) {
        // post数据的获取
        const data = req.body

        // console.log(req.headers.aa);
        let { aa } = req.headers
        data.aa = aa

        res.status(201).send(data)
    },
    async addModel(req, res) {
        const data = req.body
            // console.log(data)
        let aa = await models.addNewsModel(req.body.arr)
        res.status(201).send(data)
    },
    async findModel(req, res) {
        let obj = req.body
        console.log(obj);
        let arr = await models.findTModel(obj)
        console.log(arr)
        res.status(201).send(arr)
    },
    async findListModel(req, res) {
        let arr = await models.findTermModel()
        res.status(201).send(arr)
    }

}